home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / GCC / CLIB / !clib / h / float < prev    next >
Text File  |  1997-03-23  |  4KB  |  115 lines

  1. /* float.h
  2.  
  3.    For use with the GNU compilers and the SharedCLibrary.
  4.    (c) Copyright 1997, Nick Burrett.  */
  5.  
  6. #ifndef __FLOAT_H
  7. #define __FLOAT_H
  8.  
  9. /* Value of the base, or radix, of exponent representation.  */
  10. #define FLT_RADIX 2
  11.  
  12. /* Characterizes the rounding mode for floating point addition.
  13.    -1 = the mode is indeterminable.
  14.    0 = rounding is towards zero.
  15.    1 = rounding is to the nearest number.
  16.    2 = rounding is towards positive infinity. */
  17. #define FLT_ROUNDS 1
  18.  
  19. /* Number of base-'FLT_RADIX' digits in the floating point mantissa
  20.    for the float data type.  */
  21. #define FLT_MANT_DIG 24
  22.  
  23. /* Number of base-'FLT_RADIX' digits in the floating point mantissa
  24.    for the double data type.  */
  25. #define DBL_MANT_DIG 53
  26.  
  27. /* Number of base-'FLT_RADIX' digits in the floating point mantissa
  28.    for the long double data type.  */
  29. #define LDBL_MANT_DIG 53
  30.  
  31. /* Number of decimal digits of precision for the float data type.  */
  32. #define FLT_DIG 6
  33.  
  34. /* Number of decimal digits of precision for the double data type.  */
  35. #define DBL_DIG 15
  36.  
  37. /* Number of decimal digits of precision for the long double data type.  */
  38. #define LDBL_DIG 15
  39.  
  40. /* Smallest possible exponent value for type float.  */
  41. #define FLT_MIN_EXP (-125)
  42.  
  43. /* Smallest possible exponent value for type double.  */
  44. #define DBL_MIN_EXP (-1021)
  45.  
  46. /* Smallest possible exponent value for type long double.  */
  47. #define LDBL_MIN_EXP (-1021)
  48.  
  49. /* Minimum negative integer such that 10 raised to this power
  50.    minus 1 can be represented as a normalized floating point
  51.    number of type float.  */
  52. #define FLT_MIN_10_EXP (-37)
  53.  
  54. /* Minimum negative integer such that 10 raised to this power
  55.    minus 1 can be represented as a normalized floating point
  56.    number of type double.  */
  57. #define DBL_MIN_10_EXP (-307)
  58.  
  59. /* Minimum negative integer such that 10 raised to this power
  60.    minus 1 can be represented as a normalized floating point
  61.    number of type long double.  */
  62. #define LDBL_MIN_10_EXP (-307)
  63.  
  64. /* Largest possible exponent value for type float.  */
  65. #define FLT_MAX_EXP 128
  66.  
  67. /* Largest possible exponent value for type double.  */
  68. #define DBL_MAX_EXP 1024
  69.  
  70. /* Largest possible exponent value for type long double.  */
  71. #define LDBL_MAX_EXP 1024
  72.  
  73. /* Maximum positive integer such that 10 raised to this power
  74.    minus 1 can be represented as a normalized floating point
  75.    number of type long double.  */
  76. #define FLT_MAX_10_EXP 38
  77.  
  78. /* Maximum positive integer such that 10 raised to this power
  79.    minus 1 can be represented as a normalized floating point
  80.    number of type long double.  */
  81. #define DBL_MAX_10_EXP 308
  82.  
  83. /* Maximum positive integer such that 10 raised to this power
  84.    minus 1 can be represented as a normalized floating point
  85.    number of type long double.  */
  86. #define LDBL_MAX_10_EXP 308
  87.  
  88. /* Maximum number representable in type float.  */
  89. #define FLT_MAX 3.40282347e+38F
  90. /* Maximum number representable in type double.  */
  91. #define DBL_MAX 1.79769313486231571e+308
  92. /* Maximum number representable in type long double.  */
  93. #define LDBL_MAX 1.79769313486231571e+308L
  94.  
  95. /* Minimum positive floating point number of type float
  96.    such that '1.0 + FLT_EPSILON != 1.0' is true.  */
  97. #define FLT_EPSILON 1.19209290e-7F
  98.  
  99. /* Minimum positive floating point number of type double
  100.    such that '1.0 + DBL_EPSILON != 1.0' is true.  */
  101. #define DBL_EPSILON 2.2204460492503131e-16
  102.  
  103. /* Minimum positive floating point number of type long double
  104.    such that '1.0 + DBL_EPSILON != 1.0' is true.  */
  105. #define LDBL_EPSILON 2.2204460492503131e-16L
  106.  
  107. /* Minimum number representable in type float.  */
  108. #define FLT_MIN 1.17549435e-38F
  109. /* Minimum number representable in type double.  */
  110. #define DBL_MIN 2.22507385850720138e-308
  111. /* Minimum number representable in type long double.  */
  112. #define LDBL_MIN 2.22507385850720138e-308L
  113.  
  114. #endif
  115.